﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserInfo.aspx.cs" Inherits="BasicInfo_UserInfo"
    CodeFileBaseClass="Frame.Pages.ActionInfomationEditBasePage" MasterPageFile="~/MainMaster.master" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript" src="../Scripts/ToChineseSpell.js"></script>
    <script type="text/javascript" src="../Scripts/EnterAsTab.js"></script>
    <link href="Css/web20110913.css" rel="stylesheet" type="text/css" charset="gb2312" />
    <script type="text/javascript">
        function OnGridFocusedRowChanged() {
            gridView.GetRowValues(gridView.GetFocusedRowIndex(), 'rybm;ryxm', OnGetRowValues);
        }

        function OnGetRowValues(values) {
            rybm.SetText(values[0]);
            ryxm.SetText(values[1]);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <h1 class="DemoTitle">
        人员信息管理
    </h1>
    <dx:ASPxPopupControl ID="bmPanel" runat="server" HeaderText="部门选择" HeaderStyle-Font-Size="Small"
        Width="400px" CloseAction="CloseButton" Modal="True" PopupHorizontalAlign="WindowCenter"
        PopupVerticalAlign="WindowCenter" ClientInstanceName="bmPanel" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
        CssPostfix="Office2010Blue" EnableHotTrack="False" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
        OnLoad="bmPanel_Load">
        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
        </LoadingPanelImage>
        <HeaderStyle Font-Size="Small"></HeaderStyle>
        <LoadingPanelStyle ImageSpacing="5px">
        </LoadingPanelStyle>
        <ContentCollection>
            <dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" SupportsDisabledAttribute="True">
                <table>
                    <tr>
                        <td>
                            人员编码：
                        </td>
                        <td>
                            <dx:ASPxTextBox ID="txtRybm" runat="server" Width="100px" ClientInstanceName="rybm"
                                Font-Size="Small" ReadOnly="true" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                            </dx:ASPxTextBox>
                        </td>
                        <td>
                            人员姓名：
                        </td>
                        <td>
                            <dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="100px" ClientInstanceName="ryxm"
                                Font-Size="Small" ReadOnly="true" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                            </dx:ASPxTextBox>
                        </td>
                    </tr>
                </table>
                <dx:ASPxCallbackPanel ID="QueryCBPanel" runat="server" OnCallback="QueryCBPanel_Callback"
                    ClientInstanceName="QueryPanel">
                    <PanelCollection>
                        <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                            <dx:ASPxTreeList ID="DxTreelist" runat="server" AutoGenerateColumns="False" ClientInstanceName="QueryTree"
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                Font-Size="10pt" KeyFieldName="bmbm" ParentFieldName="fbmbm" Width="400px">
                                <Columns>
                                    <dx:TreeListTextColumn Caption="部门编号" FieldName="bmbm" ShowInCustomizationForm="True"
                                        Width="150px" VisibleIndex="0">
                                    </dx:TreeListTextColumn>
                                    <dx:TreeListTextColumn Caption="部门名称" FieldName="bmmc" ShowInCustomizationForm="True"
                                        Width="200px" VisibleIndex="1">
                                    </dx:TreeListTextColumn>
                                </Columns>
                                <Settings SuppressOuterGridLines="True" />
                                <SettingsBehavior AllowFocusedNode="True" AutoExpandAllNodes="True" />
                                <Settings SuppressOuterGridLines="True"></Settings>
                                <SettingsBehavior AutoExpandAllNodes="True" AllowFocusedNode="True"></SettingsBehavior>
                                <SettingsPager>
                                    <Summary Text="当前第{0}页，共{1}页，{2}条记录" />
                                    <Summary Text="当前第{0}页，共{1}页，{2}条记录"></Summary>
                                </SettingsPager>
                                <SettingsSelection Enabled="True" Recursive="True" />
                                <SettingsSelection Enabled="True" Recursive="True"></SettingsSelection>
                                <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/TreeList/Loading.gif">
                                    </LoadingPanel>
                                </Images>
                                <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                    <LoadingPanel ImageSpacing="5px">
                                    </LoadingPanel>
                                </Styles>
                                <StylesPager>
                                    <PageNumber ForeColor="#3E4846">
                                    </PageNumber>
                                    <Summary ForeColor="#1E395B">
                                    </Summary>
                                </StylesPager>
                                <StylesEditors ButtonEditCellSpacing="0">
                                </StylesEditors>
                            </dx:ASPxTreeList>
                            <dx:ASPxButton ID="btnSave" runat="server" Text="保存" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                AutoPostBack="False" UseSubmitBehavior="False">
                                <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback(rybm.GetValue()); }" />
                            </dx:ASPxButton>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxCallbackPanel>
            </dx:PopupControlContentControl>
        </ContentCollection>
    </dx:ASPxPopupControl>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxButton ID="btnBm" runat="server" Text="设置人员部门信息" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
            CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <ClientSideEvents Click="function(s, e) { bmPanel.Show(); }" />
        </dx:ASPxButton>
        <dx:ASPxRoundPanel ID="MainRoundPanel" runat="server" View="GroupBox" Width="100%"
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
            EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px"
            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
            <HeaderStyle>
                <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
            </HeaderStyle>
            <PanelCollection>
                <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxRoundPanel>
        <dx:ASPxGridView ID="gridView" runat="server" AutoGenerateColumns="False" Width="100%"
            ClientInstanceName="gridView" DataSourceID="LSMDSourceMain" KeyFieldName="rybm"
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
            OnCellEditorInitialize="gridView_CellEditorInitialize" EnableSelection="false">
            <SettingsBehavior AllowFocusedRow="True" />
            <ClientSideEvents FocusedRowChanged="function(s, e) { OnGridFocusedRowChanged(); }" />
            <Columns>
                <dx:GridViewDataTextColumn Name="t_rybm" FieldName="rybm" Caption="人员编码" VisibleIndex="0"
                    ReadOnly="true" CellStyle-HorizontalAlign="Left">
                    <PropertiesTextEdit MaxLength="10" Width="200px" Style-Font-Size="10pt">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="人员编码不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Name="t_ryxm" FieldName="ryxm" Caption="人员姓名" VisibleIndex="1">
                    <PropertiesTextEdit MaxLength="50" Width="200px" Style-Font-Size="10pt">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="人员姓名不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <%--  <dx:GridViewDataTextColumn VisibleIndex="2" Caption="部门" Width="60px">
                    <DataItemTemplate>
                        <a>部门
                        </a>
                    </DataItemTemplate>
                    <EditFormSettings Visible="False" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>--%>
                <dx:GridViewDataComboBoxColumn Caption="部门" Name="t_bmbm" FieldName="bmbm" VisibleIndex="2">
                    <PropertiesComboBox Spacing="0" ValueType="System.String" Width="200px" Style-Font-Size="10pt">
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near" Visible="False" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataComboBoxColumn Caption="角色" FieldName="rid" Name="t_rid" VisibleIndex="3">
                    <PropertiesComboBox Spacing="0" ValueType="System.String" Width="200px" Style-Font-Size="10pt">
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataImageColumn Caption="照片" FieldName="pic" Name="t_pic" VisibleIndex="4"
                    Visible="false">
                    <EditFormSettings CaptionLocation="Near" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataImageColumn>
                <dx:GridViewDataComboBoxColumn Caption="活动标记" FieldName="flag" Name="t_flag" VisibleIndex="5">
                    <PropertiesComboBox ValueType="System.Char" Spacing="0" Width="200px" Style-Font-Size="10pt">
                        <Items>
                            <dx:ListEditItem Text="活动" Value="A" ImageUrl="../Images/icon/A.png" />
                            <dx:ListEditItem Text="暂停" Value="P" ImageUrl="../Images/icon/Z.png" />
                        </Items>
                        <Style Font-Size="10pt"></Style>
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataTextColumn Name="t_founder" FieldName="founder" Caption="创建人" VisibleIndex="6">
                    <EditFormSettings Visible="False" CaptionLocation="Near" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Name="t_fdate" FieldName="fdate" Caption="创建时间" VisibleIndex="7">
                    <EditFormSettings Visible="False" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Name="f_editor" FieldName="editor" Caption="修改人" VisibleIndex="8">
                    <EditFormSettings Visible="False" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Name="f_edate" FieldName="edate" Caption="最后修改时间" VisibleIndex="9">
                    <EditFormSettings Visible="False" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
            </Columns>
            <SettingsEditing EditFormColumnCount="2" Mode="PopupEditForm" PopupEditFormModal="true"
                PopupEditFormHorizontalAlign="WindowCenter" PopupEditFormVerticalAlign="WindowCenter" />
            <Settings ShowFilterRow="True" />
            <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <StylesPager>
                <PageNumber ForeColor="#3E4846">
                </PageNumber>
                <Summary ForeColor="#1E395B">
                </Summary>
            </StylesPager>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
        </dx:ASPxGridView>
        <dx:LinqServerModeDataSource ID="LSMDSourceMain" runat="server" EnableDelete="true"
            EnableUpdate="true" EnableInsert="true" ContextTypeName="DAL.DataClassesDataContext"
            TableName="css_user" OnInserting="LSMDSourceMain_Inserting" OnUpdating="LSMDSourceMain_Updating" />
    </div>
</asp:Content>
